// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';


import Minting from '@/views/pages/minting';
import Transparency from '@/views/pages/transparency';
import Ecosystem from '@/views/pages/ecosystem';
import SwapView from '@/views/pages/SwapView';
import Dashboard from '@/views/pages/Dashboard';


import home from '@/views/home';

// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/home',
            name: '个人中心',
            component: home,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/minting',
            name: 'AusD Minting',
            component: Minting,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/dashboard',
            name: 'AusD Dashboard',
            component: Dashboard,
            meta: {
                requireAuth: true
            }
        },
        
        {
            path: '/transparency',
            name: 'AusD Transparency',
            component: Transparency,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/ecosystem',
            name: 'AusD Ecosystem',
            component: Ecosystem,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/swap',
            name: 'Asset Swap',
            component: SwapView,
            meta: {
                requireAuth: true
            }
            
        }
    ]
    }]
})